package com.yunhe.merchants.repository;

import com.yunhe.merchants.domain.DeptPlanData;
import com.yunhe.merchants.domain.SalesmanPlanData;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName: SalesmanPlanDataRepository
 * @Description:
 * @author: GongDaCheng
 * @Date: 16:33 2021/5/13
 */
@Repository
public interface SalesmanPlanDataRepository {
    /**
     * @Description 新增业务员计划
     * @Param salesmanPlanData
     * @Return int
     * @Date 2021/5/13 16:34
     */
    int insert(SalesmanPlanData salesmanPlanData);

    /**
     * @Description 根据部门id和年查询业务员计划
     * @Param String year
     * @Return Long orgId
     * @Date 2021/5/14 10:47
     */
    List<SalesmanPlanData> selectSalesmanPlanDataByYearAndOrg(@Param("year") String year,@Param("orgId") Long orgId);

    SalesmanPlanData getSalesmanPlan(@Param("orgId")Long orgId, @Param("salesmanId")Long salesmanId, @Param("type") String type, @Param("year") String year, @Param("quarter") String quarter, @Param("month") String month);
}
